<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="#">系统首页</a>
			</li>
			<li class="active">
				信息互动
			</li>
            <li class="active">
				发送记录
			</li>
		</ul><!-- .breadcrumb -->
	</div>
	<!-- Main content -->
    <div class="page-content">
    	<div class="row">
    	    <div class="page-header">
    			<h1>短信发送记录表</h1>
    		</div>
    		<div class=" col-md-12 col-sm-12 col-xs-12 form">
                <div class="row">
                <form action="<?php echo base_url().'admin/message/query_message_record'?>" method="get">
                    <div class="wh">
                    	<label>发送时间：</label>
                        <input type="text" id="send_time1" name="send_time1" value="<?php if (isset($send_time1))echo $send_time1;?>" style="width:60%;"/>
                    </div>
                    <div class="wh">
                    	<label>结束时间：</label>
                        <input type="text" id="send_time2" name="send_time2" value="<?php if (isset($send_time2))echo $send_time2;?>" style="width:60%;"/>
                    </div>
                    <div class="wh">
                    <button class="btn btn-sm btn-info" type="submit"><i class="icon-search"></i>查询</button>
                    </div> 
                </form>
                </div>
            </div>
            <div class="col-xs-12 margin_t margin_b">
				<div class="table-responsive  tab">
					<table id="sample-table-1" class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th class="center" style="width: 3%;">
									<label>
										<input type="checkbox" class="ace" />
										<span class="lbl"></span>
									</label>
								</th>
								<th>发送时间</th>
								<th>短信内容</th>
                                <th>发送人</th>
                                <th>总条数</th>
                                <th>成功条数</th>
                                <th>失败条数</th>
                                <th style="width: 8%;">操作</th>
							</tr>
						</thead> 
						<tbody>
						<?php if (isset($result)&&count($result)>0){
                            	foreach ($result as $message){
                            	?>
							<tr>
								<td class="center">
                                	<p>
									<label>
										<input type="checkbox" class="ace" name="num[]" value="<?php echo $message->id;?>"/>
										<span class="lbl"></span>
									</label>
                                    </p>
								</td>
								<td><p><?php echo $message->send_time;?></p></td>
                                <td>
                                    <p><?php echo $message->content;?> 
                            	    </p>
                            	</td>
                                <td><p><?php echo $message->user_name;?></p></td>
                                <td><p><?php echo $message->total_num;?></p></td>
                                <td><p><?php echo $message->success_num;?></p></td>
                                <td><p><?php echo $message->fail_num;?></p></td>
                                <td>
                                    <a class="btn btn-sm btn-info" href="<?php echo base_url()."admin/upyun/choose_message_detail/".$message->id;?>" data-target="#staffModal" data-toggle="modal"><i class="icon-edit"></i>查看明细</a>
                                </td>
    						</tr>
    						<?php }
                            }else{?>
                            <tr>
                            	<td colspan="8">无数据</td>
                            </tr>
                            <?php }?>
                            </tbody>
                         </table>
                     </div><!-- /.table-responsive -->
				</div>
                <div class="col-sm-12">
                	<div class="modal-footer no-margin-top">
	                	<div class="pull-left record">
							共<?php echo $count;?>条记录
	                    </div>
                		<?php if (isset($page))echo $page;?>
                	</div>
                </div>
            </div><!-- /.row -->
		</div><!-- /.page-content -->
	</div><!-- /.main-content -->
	<script type="text/javascript">
    $(function () {
        $('#send_time1').datetimepicker({
            format: 'yyyy-mm-dd', 'autoclose': true, minView: 2,language: 'zh-CN'
        });
        $('#send_time2').datetimepicker({
            format: 'yyyy-mm-dd', 'autoclose': true, minView: 2,language: 'zh-CN'
        });
    });
</script>